
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
	<head>
	<meta charset="utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<title>Minimal and Clean Sign up / Login and Forgot Form by FreeHTML5.co</title>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<meta name="description" content="Free HTML5 Template by FreeHTML5.co" />
	<meta name="keywords" content="free html5, free template, free bootstrap, html5, css3, mobile first, responsive" />
	<link rel="shortcut icon" href="favicon.ico" />
		<link rel="stylesheet" href="../bootstrap-3.3.7-dist/css/bootstrap.css" />
	<link rel="stylesheet" href="../css/animate.css" />
	<link rel="stylesheet" href="../css/style.css" />
	<script src="../js/modernizr-2.6.2.min.js"></script>
	<script src="../js/respond.min.js"></script>
	</head>

	<body class="style-2">å
	<div class="container">
		<div class="row">
			<div class="col-md-4">
				<!-- Start Sign In Form -->
				<form id="form-register" method="post" class="fh5co-form animate-box" data-animate-effect="fadeInLeft">
					<h2>注册</h2>
					<div class="form-group">
						<div class="alert alert-success" role="alert">请输入您的账号信息</div>
						<input type="text" value="3" name="type" hidden="hidden" />
					</div>
					<div class="form-group">
						<label for="identifier" class="sr-only">账户</label>
						<input type="text" class="form-control" id="identifier"  name="identifier" placeholder="identifier" autocomplete="off" />
					</div>
					<div class="form-group">
						<label for="password" class="sr-only">密码</label>
						<input type="password" class="form-control" id="password"  name="password" placeholder="Password" autocomplete="off" />
					</div>
					<div class="form-group">
						<label for="passwordConfirm" class="sr-only">确认密码</label>
						<input type="password" class="form-control" id="passwordConfirm" name="passwordConfirm" placeholder="Password Confirm" autocomplete="off" />
					</div>
					<div class="form-group">
						<p>已经注册? <a href="/signIn">登录</a></p>
					</div>
					<div class="form-group">
						<input id="btn-register" type="button" value="注册" class="btn btn-primary" />
					</div>
				</form>
				<!-- END Sign In Form -->
			</div>
		</div>
		<div class="row" style="padding-top: 60px; clear: both;">
			<div class="col-md-12 text-center"><p><small>&copy; All Rights Reserved. More Templates <a href="http://www.cssmoban.com/" target="_blank" title=""></a> - Collect from <a href="http://www.cssmoban.com/" title="" target="_blank"></a></small></p></div>
		</div>
	</div>
	</body>

	<!-- jQuery -->
	<script src="../jquery/jquery-3.3.1.min.js"></script>
	<!-- Bootstrap -->
	<script src="../bootstrap-3.3.7-dist/js/bootstrap.js"></script>
	<!-- Placeholder -->
	<script src="../js/jquery.placeholder.min.js"></script>
	<!-- Waypoints -->
	<script src="../js/jquery.waypoints.min.js"></script>
	<!-- Main JS -->
	<script src="../js/main.js"></script>
	<script>
        $("#btn-register").click(function () {
            $.ajax({
                type: 'post',
                url: 'register',
                data:$('#form-register').serialize(),
                beforeSend: function (XMLHttpRequest) {

                },
                success: function (data) {
                    if("注册成功"==data){
                        $(".alert").html(data+",2s后到个人页");
                        setTimeout(function () {
                            location.href="signIn";
                        },2000);
					}else{
                        $(".alert").html(data);
					}
                },
                complete: function (XMLHttpRequest, textStatus) {

                },
                error: function () {
                }
            });
        });
	</script>
</html>

